/*******************************************************************************
 * Copyright (c) 2014 Steffen Mikkelsen
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Public License v3.0
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/gpl.html
 * 
 * Contributors:
 *     Steffen Mikkelsen - initial API and implementation
 ******************************************************************************/
package com.subsecret.secureconnection.securestream.layers;

import java.io.IOException;

import org.junit.Test;

import com.subsecret.secureconnection.securestream.layers.aes.AESEncryptionLayer;
import com.subsecret.secureconnection.securestream.layers.gzip.GZIPCompressionLayer;
import com.subsecret.secureconnection.securestream.layers.obfuscation.ObfuscationLayer;

public class LayersTest {
    
    @Test
    public void secureStreamGZIPAndObfusAndAES() throws IOException, InterruptedException {
        LayerTestTools.testSecureStream(new GZIPCompressionLayer(), new ObfuscationLayer(), new AESEncryptionLayer());
    }
    
    @Test
    public void secureStreamGZIPAndAESAndObfus() throws IOException, InterruptedException {
        LayerTestTools.testSecureStream(new GZIPCompressionLayer(), new AESEncryptionLayer(), new ObfuscationLayer(),
                new GZIPCompressionLayer(), new AESEncryptionLayer(), new GZIPCompressionLayer(), new ObfuscationLayer());
    }
    
    @Test
    public void secureStreamNoMonitorWithGZIPAndObfusAndAES() throws IOException, InterruptedException {
        LayerTestTools.testSecureStream(false, new GZIPCompressionLayer(), new AESEncryptionLayer(), new ObfuscationLayer(),
                new GZIPCompressionLayer(), new AESEncryptionLayer(), new GZIPCompressionLayer(), new ObfuscationLayer());
    }
    
    @Test
    public void secureStreamNoLayers() throws IOException, InterruptedException {
        LayerTestTools.testSecureStream();
    }
    
}
